using LogSystem;
using UnityEngine;

namespace Yoozoo.Gameplay.City
{
    public static class CityRealAiConst
    {
        /// <summary>
        /// NPC显示层
        /// </summary>
        public static int NpcShowLayerMask = LayerMask.NameToLayer("city");

        /// <summary>
        /// NPC隐藏层
        /// </summary>
        public static int NpcHideLayerMask = 0;
        
        /// <summary>
        /// HUD分几帧执行
        /// </summary>
        public static int HudUpdateInterval = 3;

        /// <summary>
        /// HUD气泡X轴偏移量
        /// </summary>
        public static float HudXOffset = 0.06f;
        
        /// <summary>
        /// HUD气泡Y轴偏移量
        /// </summary>
        public static float HudYOffset = 1.26f;

        /// <summary>
        /// HUD气泡Z轴偏移量
        /// </summary>
        public static float HudZOffset = 0.05f;

        /// <summary>
        /// 刷新间隔
        /// </summary>
        public static float UpdateDeltaTime = 1;

        /// <summary>
        /// 出城事件Id
        /// </summary>
        public static int OutCityEvnetId = 3;

        /// <summary>
        /// 进城事件Id
        /// </summary>
        public static int InCityEventId = 4;

        /// <summary>
        /// 上车事件
        /// </summary>
        public static int BusGetOnTransportEventId = 8;

        /// <summary>
        /// 下车事件
        /// </summary>
        public static int BusGetOffTransportEventId = 9;

        /// <summary>
        /// 出城点
        /// </summary>
        public static Vector3 OutCityPosition = new Vector3(65.58f, 0f, -65.64f);
        
        /// <summary>
        /// 通用房间事件ID
        /// </summary>
        public static int CommonRoomEventId = 101;

        /// <summary>
        /// 在一个事件中，Hud可以触发的次数
        /// </summary>
        public static int HudTriggerMaxNum = 1;

        /// <summary>
        /// 单次事件树最大尝试执行上限，防止死循环
        /// </summary>
        public static int MaxTryExecuteIndex = 5;

        /// <summary>
        /// 找不到可执行事件时的保底待机事件
        /// </summary>
        public static int FinallyEventTreeId = 110;

        /// <summary>
        /// 通用户外角色待机
        /// </summary>
        public static int CommonWaitTreeId = 114;
        
        /// <summary>
        /// 前门雇员隐藏行为树
        /// </summary>
        public const int FrontStaffHideEventTreeId = 410;

        /// <summary>
        /// 后门雇员隐藏行为树
        /// </summary>
        public const int BackStaffHideEventTreeId = 409;
        
        /// <summary>
        /// 建筑工人标签
        /// </summary>
        public static int UpgradeNpcTag = 3;

        /// <summary>
        /// 运输工人标签
        /// </summary>
        public static int TransportNpcTag = 4;

        /// <summary>
        /// 虚拟交互物最小Id
        /// </summary>
        public static int VirtualGoodsMinId = 70000;

        /// <summary>
        /// 虚拟交互物最大Id
        /// </summary>
        public static int VirtualGoodsMaxId = 80000;

        /// <summary>
        /// 最多寻路失败的次数
        /// </summary>
        public static int MaxSearchPathFailedIndex = 3;

        /// <summary>
        /// npc默认寻路速度
        /// </summary>
        public static int NpcDefaultMaxSpeed = 2;

        /// <summary>
        /// npc离开内城寻路速度
        /// </summary>
        public static int NpcLeaveMaxSpeed = 3;
        
        public static float NpcLightMaxProgress = 1;

        public static float NpcLightMinProgress = 0;

        /// <summary>
        /// npc变亮、变暗动画更新间隔
        /// </summary>
        public static float NpcLightAniUpdateInterval = 0.1f;
        
        /// <summary>
        /// npc变亮、变暗动画时间
        /// </summary>
        public static float NpcLightAniTime = 0.5f;

        /// <summary>
        /// npc上车间隔时间，在1秒内的Update里更新，因此只支持整数秒。
        /// </summary>
        public static int NpcGetOnTransportTime = 0;

        /// <summary>
        /// npc下车间隔时间，在1秒内的Update里更新，因此只支持整数秒。
        /// </summary>
        public static int NpcGetOffTransportTime = 1;

        /// <summary>
        /// 不可下车阶段列表
        /// </summary>
        public static DailyStage[] GetOffTransportStageArray =
        {
            //DailyStage.Night,
        };

        /// <summary>
        /// 城墙所在区域id
        /// </summary>
        public static int WallAreaId = 1;

        /// <summary>
        /// 城墙id
        /// </summary>
        public static int WallId = 61004;
        
        /// <summary>
        /// 大厅id
        /// </summary>
        public static int HallId = 61001;

        /// <summary>
        /// 豪宅客厅id
        /// </summary>
        public static int MansionLivingRoomId = 62001;
        
        /// <summary>
        /// 小人Hud整体缩放系数
        /// </summary>
        public static Vector3 HudScale = new Vector3(0.056f, 0.056f, 0.056f);

        /// <summary>
        /// npc下车动画时间
        /// </summary>
        public static float NpcGetOffTransportAniTime = 0.1f;

        /// <summary>
        /// npc上车动画时间
        /// </summary>
        public static float NpcGetOnTransportAniTime = 0.1f;

        /// <summary>
        /// 检票行为树ID
        /// </summary>
        public static int[] CheckTicketEventTreeIds = new[]
        {
            10403,
            10406
        };
        
        /// <summary>
        /// 开门营业蓝图
        /// </summary>
        public static string CityBusinessBlueprint = "Assets/ResourcesAssets/Persistent/Blueprint/CityBusinessBlueprint.prefab";

        /// <summary>
        /// 开始营业蓝图事件节点
        /// </summary>
        public static string CityBusinessOpenBusinessEventName = "OpenManualBusiness";
        
        /// <summary>
        /// 开始营业蓝图事件节点 （跳过Timeline版本）
        /// </summary>
        public static string CityBusinessSkipTimelineEventName = "SkipManualBusinessTimeline";

        /// <summary>
        /// timeline跳过事件名字
        /// </summary>
        public static string CityBusinessTimelineSkipEventName = "Timeline_innercity_bus_camera";

        /// <summary>
        /// 开门营业检票时间
        /// </summary>
        public static float CheckTicketTime = 5f;

        /// <summary>
        /// 检票口数量
        /// </summary>
        public static int TicketCollectorCount = 1;

        /// <summary>
        /// 默认房间接待客人的时长
        /// </summary>
        public static float DefaultRoomReceptionTime = 30;

        /// <summary>
        /// 提前通知顾客离开的时间
        /// </summary>
        public static float CustomerLeaveTime = 0;

        /// <summary>
        /// 强行结束营业后的巴士等待离开时间
        /// </summary>
        public static float CustomerBusLeaveTime = 60;

        /// <summary>
        /// 营业巴士离开cd
        /// </summary>
        public static float CustomerBusLeaveCityCD = 10;

        /// <summary>
        /// 自动营业巴士索引
        /// </summary>
        public static int AutoBusinessBusIndex = 0;

        /// <summary>
        /// 第一次触发自动营业的间隔
        /// </summary>
        public static float FirstAutoBusinessInterval = 90;
        
        /// <summary>
        /// 自动营业触发间隔
        /// </summary>
        public static float AutoBusinessInterval = 90;
        
        /// <summary>
        /// 自动营业是否开启
        /// </summary>
        public static bool IsOpenAutoBusiness = false;

        /// <summary>
        /// GpuSkinning开关
        /// </summary>
        public static bool EnableGpuSkinning = true;

        /// <summary>
        /// 主角预制体名
        /// </summary>
        public static string MainCharacterModelName = "LeadMan";

        /// <summary>
        /// 默认主角的预制体名
        /// </summary>
        public static readonly string DefaultMainCharacterModelName = "LeadMan";

        /// <summary>
        /// 默认npc的预制体名
        /// </summary>
        public static readonly string DefaultModelName = "CiyNpc_Male_Free_01";

        /// <summary>
        /// npc路径
        /// </summary>
        public static string NpcPath = "Assets/ResourcesAssets/City/Npc/{0}.prefab";

        /// <summary>
        /// npc gpu skinning路径
        /// </summary>
        public static string NpcGpuSkinningPath = "Assets/ResourcesAssets/City/GpuSkinning/{0}.prefab";

        /// <summary>
        /// 交互物道具路径
        /// </summary>
        public static string InteractivePath = "Assets/ResourcesAssets/City/Interactive/{0}.prefab";
        
        /// <summary>
        /// 触发特效路径
        /// </summary>
        public static string TriggerEffectPath = "Assets/ResourcesAssets/City/Effect/{0}.prefab";
        
        /// <summary>
        /// 气泡道具路径
        /// </summary>
        public static string BubblePath = "Assets/ResourcesAssets/City/AIBubble/{0}.prefab";

        /// <summary>
        /// 雇员气泡icon路径
        /// </summary>
        public static string StaffBubbleIconPath = "Assets/ResourcesAssets/City/AIBubble/{0}.png";
        
        /// <summary>
        /// 气泡默认绑定骨骼
        /// </summary>
        public static int DefaultBubbleBone = 2;

        /// <summary>
        /// 特效默认绑定骨骼
        /// </summary>
        public static int DefaultEffectBone = 5;
        
        /// <summary>
        /// 对话气泡资源名
        /// </summary>
        public static string BubbleDialogue = "bubble_dialogue";

        /// <summary>
        /// 美女心情值气泡资源名
        /// </summary>
        public static string BubbleBabeMood = "babe_mood_bubble";

        /// <summary>
        /// 美女心情值资源id
        /// </summary>
        public static int BabeMoodResId = 62;

        /// <summary>
        /// 进度条资源名
        /// </summary>
        public static string BubbleProgressBar = "bubble_progress";
        
        /// <summary>
        /// 进度条绑定骨骼
        /// </summary>
        public static int BubbleProgressBarBone = 2;
        
        /// <summary>
        /// 是否在主动营业中
        /// </summary>
        public static bool IsInOpenBusiness = false;

        /// <summary>
        /// DJ自动消费时长
        /// </summary>
        public static float AutoDJDuration = 5;

        /// <summary>
        /// 自动消费时长
        /// </summary>
        public static float AutoCustomDuration = 15;
                
        /// <summary>
        /// 自动消费时长波动范围
        /// </summary>
        public static float AutoCustomRange = 3;
        
        /// <summary>
        /// 是否允许弹出商品气泡
        /// </summary>
        public static bool CanShowCommodityBubble = true;

        /// <summary>
        /// 是否允许显示自动消费进度条
        /// </summary>
        public static bool CanShowAutoCustomProgressBar = true;
        
        /// <summary>
        /// 商品气泡资源名
        /// </summary>
        public static string CommodityBubble = "commodity_bubble";

        /// <summary>
        /// 商品刷新时间
        /// </summary>
        public static float CommodityRefreshDuration = 1;

        /// <summary>
        /// 商品气泡触发概率 （百分比）
        /// </summary>
        public static int CommodityBubbleProbability = 10;
        
        /// <summary>
        /// 商品收入气泡
        /// </summary>
        public static string CommodityCostBubble = "commodity_cost";
        
        /// <summary>
        /// 点赞气泡
        /// </summary>
        public static string CommodityLikeBubble = "commodity_like";

        /// <summary>
        /// 点燃激情气泡
        /// </summary>
        public static string LightPassionBubble = "light_passion";
        
        /// <summary>
        /// 雇员雇佣气泡
        /// </summary>
        public static string StaffBubble = "npc_staff";

        /// <summary>
        /// 顾客爱心气泡
        /// </summary>
        public static string CustomerHappyEffect = "sfx_icon_aiixn";

        /// <summary>
        /// 顾客小费Buff
        /// </summary>
        public static string CustomerTipEffect = "sfx_ui_xiaoren_buff";
        
        /// <summary>
        /// 顾客点燃特效
        /// </summary>
        public static string CustomerBurnEffect = "sfx_ui_xiaoren";

        /// <summary>
        /// 顾客心碎气泡
        /// </summary>
        public static string CustomerSadEffect = "sfx_icon_heartbroken";

        /// <summary>
        /// 顾客心情特效时间
        /// </summary>
        public static float CustomerMoodEffectDuration = 2f;

        /// <summary>
        /// 垃圾交互物配置id
        /// </summary>
        public static int RubbishGoodsCfgId = 2;

        /// <summary>
        /// 垃圾事件id
        /// </summary>
        public static int RubbishEventId = 1001811;

        /// <summary>
        /// 垃圾骨骼
        /// </summary>
        public static int RubbishBubbleBone = 2;
        
        /// <summary>
        /// 垃圾气泡资源名
        /// </summary>
        public static string CommodityBubbleRubbish = "commodity_bubble_rubish";

        /// <summary>
        /// 设施修复交互物配置id
        /// </summary>
        public static int FixGoodsCfgId = 4;

        /// <summary>
        /// 修复设备事件id
        /// </summary>
        public static int FixEventId = 1001813;
        
        /// <summary>
        /// 修复设备气泡骨骼
        /// </summary>
        public static int FixBubbleBone = 2;
        
        /// <summary>
        /// 修复设备气泡资源名
        /// </summary>
        public static string CommodityBubbleFix = "commodity_bubble_equipbroken";

        /// <summary>
        /// 客人纠纷交互物配置Id
        /// </summary>
        public static int DisputeCfgId = 3;

        /// <summary>
        /// 客人纠纷气泡资源名
        /// </summary>
        public static string CommodityBubbleDispute = "commodity_bubble_dispute";

        /// <summary>
        /// 商品气泡触发的特殊id
        /// </summary>
        public static int CommoditySpecialId = 6;

        /// <summary>
        /// 客人纠纷气泡触发的特殊id
        /// </summary>
        public static int DisputeSpecialId = 7;
        
        /// <summary>
        /// 巴士名字
        /// </summary>
        public static string[] BusNameArray =
        {
            //"innercity_ai_bus",
            "innercity_ai_car_red",
            "innercity_ai_car_grey",
            "innercity_ai_car_pink",
            "innercity_ai_car_purple",
        };
        
        /// <summary>
        /// 巴士路径
        /// </summary>
        public static string BusPath = "Assets/ResourcesAssets/City/AIBus/Prefabs/{0}.prefab";
        
        /// <summary>
        /// 巴士进城到下车点动画
        /// </summary>
        public static string BusInCityGetOffTransportAniName = "downcar";

        /// <summary>
        /// 巴士下车点停车动画
        /// </summary>
        public static string BusGetOffTransportWaitAniName = "waitloop_downcar";
        
        /// <summary>
        /// 巴士进城到上车点动画
        /// </summary>
        public static string BusInCityGetOnTransportAniName = "incity";

        /// <summary>
        /// 巴士从下车点到上车点动画
        /// </summary>
        public static string BusToGetOnTransportAniName = "downcar_to_upcar";
        
        /// <summary>
        /// 巴士出城动画
        /// </summary>
        public static string BusOutCityAniName = "outcity";

        /// <summary>
        /// 巴士等待动画
        /// </summary>
        public static string BusWaitAniName = "wait";

        /// <summary>
        /// 特殊事件 NPC显示标签
        /// </summary>
        public static string NpcActiveTag = "npc_active";

        /// <summary>
        /// 特殊事件 NPC隐藏标签
        /// </summary>
        public static string NpcHideTag = "npc_hide";

        /// <summary>
        /// 特殊事件 房间状态标签
        /// </summary>
        public static string RoomParamaterStateTag = "state";

        public static string NpcOutCityTag = "npc_outcity";

        public static string NpcInCityTag = "npc_incity";

        public static string NpcCheckTicketTimeTag = "check_time";

        /// <summary>
        /// npc上车动画
        /// </summary>
        public static string NpcGetOnTransportAniName = "Idle";

        /// <summary>
        /// npc下车动画
        /// </summary>
        public static string NpcGetOffTransportAniName = "Idle";

        /// <summary>
        /// 超级客人特效
        /// </summary>
        public static string SupperNpcEffectName = "Assets/ResourcesAssets/City/Effect/sfx_rpg_earlystage3_halo001.prefab";
    }
}
